package com.carkeeper.service.serviceFallback;

import com.carkeeper.dto.DepartmentDTO;
import com.carkeeper.service.DepartmentFeign;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class DepartmentFallbackFactory implements FallbackFactory<DepartmentFeign> {
    @Override
    public DepartmentFeign create(Throwable throwable) {
        return new DepartmentFeign() {
            @Override
            public DepartmentDTO getDepartment(Long id) {
                return null;
            }

            @Override
            public List<DepartmentDTO> getByIds(List<Long> ids) {
                return null;
            }
        };
    }
}
